<template>
	<view class="body">
		<view class="nodataWrap" v-if="show">
			<image class="noMoreImg" src="../../../static/noMessage.svg" mode="aspectFill" lazy-load="false" @error="" @load=""></image>
			<view class="fontInfo">暂无消息...</view>
		</view>
		<view class="" style="padding-bottom: 100rpx;">
			<view class="card" v-for="(item,index) in data" @click="CardClick(item.expertId, item.questionnaireLink)">
				<view class="left_av">
					<image class="img"
						:src="item.expertAvatar == null ?  'https://img95.699pic.com/xsj/10/tm/0h.jpg%21/fh/300' : item.expertAvatar"
						mode="aspectFill"></image>
				</view>
				<view class="right">
					<view class="font1">
						<text style="padding-right: 20rpx;">{{item.expertName}}</text>
						<view class="">
							<image :src="sd" alt="" class="dsimg" mode="aspectFill"></image> 
						</view>
					</view>
					<view class="font2">
						{{item.expertExcel == null ? '暂无' : item.expertExcel }}
					</view>
					<view class="font3">
						{{item.expertAddress == null ? '暂无'  : item.expertAddress}}
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import {imgBaseUrl} from '@/utils/baseUrl.js'
	import {expertList} from '@/utils/OnetoOneaApi.js'
	export default {
		data() {
			return {
				sd:imgBaseUrl  + '/img/wshing/shudao.png',
				data:[],
				show: false
			}
		},
		async mounted(){
			let params = {
				delFlag:0
			}
			const data = await expertList(params)
			console.log("data======>",data)
			if(!data.result.records.length){
				this.show = true
				return
			}
			this.data = data.result.records
		},
		methods:{
			CardClick(id,link){
			// console.log(id,'id');
			uni.navigateTo({
				url:`../../../subPackagesB/pages/Onedetail/Onedetail?Id=${id}&link=${encodeURIComponent(link)}`
			})
			}
		},
		onHide(){
			this.show = false
		}
	}
</script>

<style lang="less" scoped>
.nodataWrap{
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	.noMoreImg{
		width: 400rpx;
		height: 400rpx;
	}
	.fontInfo{
		font-size: 28rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #737B80;
		line-height: 40rpx;
	}
}
	.body {
		width: 100%;
		height:85vh;
		background: #F5F5F5;
		display: flex;
		// justify-content: center;
		align-items: center;
		flex-direction: column;
		.card {
			width: 686rpx;
			height: 196rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			opacity: 1;
			margin-top: 20rpx;
			display: flex;
			.left_av {
				display: flex;
				width: 178rpx;
				justify-content: center;
				margin-top: 28rpx;

				.img {
					width: 104rpx;
					height: 104rpx;
					border-radius: 50%;
					opacity: 1;
				}
			}
			.right{
				padding-top: 20rpx;
				line-height: 48rpx;
				.font1{
					display: flex;
					font-size: 32rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #333333;
					.dsimg{
						width: 125rpx;
						height: 40rpx;
					}
				}
				.font2{
					font-size: 24rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
				}
				.font3{
					font-size: 24rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
				}
			}
		}
	}
</style>